<?php
if(isset($detail_news) && !empty($detail_news)):
	if (isset($breadcrumb) && !empty($breadcrumb)) :
		echo $this->element('breadcrumb');
	endif;
?>
<div class="pad group">
	<div class="post-list group">
		<div class="lbl-category pad">
			<p><?php echo $detail_news['Category']['cat_name'];?></p>
		</div>
		<div class="group-content faqs">
			<div class="sender-name">
				Bạn <strong><?php echo $detail_news['Faqs']['name'];?></strong> gửi câu hỏi lúc <?php echo date('H:i:s | Y-m-d', $detail_news['Faqs']['last_update'])?>:
			</div>
			<div class="post-box-title">
				<?php echo $detail_news['Faqs']['question'];?>
			</div><!--/.post-title-->
			<div class="lbl-answer blue">Công Chứng Âu Lạc trả lời: </div>
			<div class="entry-faq">
				<p><?php echo $detail_news['Faqs']['answer'];?></p>
			</div><!--/.entry-->
			<div class="clear"></div>

			<h4 class="blue"><i class="fa fa-edit"></i> Gửi câu hỏi cho Công Chứng Âu Lạc </h4>
			<form class="send-question" accept-charset="utf-8" method="post" action="/hoi-dap/gui-cau-hoi">
				<table class="table table-striped table-bordered table-hover" id="dataTables-example">
					<tr>
						<th width="20%">Họ và tên <span class="require red"> *</span></th>
						<td>
							<?php
							echo $this->Form->input('name', array(
									'type' => 'text',
									'label' => false,
									'class' => 'form-control w400',
									'required' => true,
									'value'=> '',
							));
							?>
						</td>
					</tr>
					<tr>
						<th width="20%">Email <span class="require red"> *</span></th>
						<td>
							<?php
							echo $this->Form->input('email', array(
									'type' => 'email',
									'label' => false,
									'class' => 'form-control w400',
									'required' => true,
									'value'=> '',
									'errorMessage' => 'Email không đúng !',
									'error' => array(
											'attributes' => array('escape' => false)
									)
							));
							?>
						</td>
					</tr>
					<tr>
						<th width="20%">Câu hỏi <span class="require red"> *</span></th>
						<td>
							<?php
								echo $this->Form->textarea('question', array(
									'label' => false,
									'required' => true,
									'rows'=> 4,
									'cols' => 70,
									'value'=>'',
								));
							?>
						</td>
					</tr>
					<tr>
						<th width="20%">Mã bảo mật <span class="require red"> *</span></th>
						<td>
							<?php echo $this->Captcha->input();?>
							<?php echo $this->Session->flash();?>
						</td>
					</tr>
					<tr>
						<th>&nbsp;</th>
						<td>
							<div class="form-group">
							<?php
							echo $this->Form->hidden('iCat', array('value' => $detail_news['Category']['id']));
							echo $this->Form->hidden('iNews', array('value' => $this->request->params['news_id']));
							echo $this->Form->hidden('cRewrite', array('value' => $this->request->params['cat_rewrite']));
							echo $this->Form->hidden('nRewrite', array('value' => $detail_news['Faqs']['question_rewrite']));
							echo $this->Form->button('Gửi câu hỏi', array(
									'type' => 'submit',
									'class' => 'btn btn-primary',
									'label' => false,
									'div' => false,
								)
							).'  ';

							echo $this->Form->button('Làm lại', array(
									'type' => 'reset',
									'class' => 'btn btn-primary',
									'label' => false,
									'div' => false,
								)
							);
							?>
							</div>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</div>
<?php
endif;
?>
<div class="clear"></div>